<%@ page language="java" import="com.yangtao.framework.common.Message" pageEncoding="utf-8" %>
<%@ page import="java.util.List" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	List<Message> message = (List<Message>) request.getAttribute("message");
%>
<HTML xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>运行平台</title>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<LINK href="<%=path%>/css/login/User_Login.css" type="text/css"
	      rel="stylesheet"/>
</head>
<BODY id=userlogin_body>
<FORM id=loginForm name=form1 method=post>
	<DIV>
	</DIV>
	<DIV id=user_login>
		<DL>
			<DD id=user_top>
				<UL>
					<LI class=user_top_l>
					</LI>
					<LI class=user_top_c>
					</LI>
					<LI class=user_top_r>
					</LI>
				</UL>
			<DD id=user_main>
				<UL>
					<LI class=user_main_l>
					</LI>
					<LI class=user_main_c>
						<DIV class=user_main_box>
							<UL>
								<LI class=user_main_text>
									用户名：
								</LI>
								<LI class=user_main_input>
									<INPUT class='TxtUserNameCssClass' id='userId' maxLength=20
									       name='userCode' value="admin"/>
								</LI>
							</UL>
							<UL>
								<LI class=user_main_text>
									密&nbsp;&nbsp;&nbsp;&nbsp;码：
								</LI>
								<LI class=user_main_input>
									<INPUT class=TxtPasswordCssClass id=password type="password"
									       name="password" value="admin"/>
								</LI>
							</UL>
							<UL>
								<LI class=user_main_text>
									验证码：
								</LI>
								<LI class=user_main_input>
									<input class=TxtValidateCodeCssClass type='text' name='identifyingCode'/>
								</LI>
							</UL>
						</DIV>
					</LI>
					<LI class=user_main_r>
						<INPUT class=IbtnEnterCssClass id=IbtnEnter
						       style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px"
						       type=image src="<%=path%>/css/login/user_botton.gif"
						       onclick="login()"/>
					</LI>
				</UL>
			<DD id=user_bottom>
				<UL>
					<LI class=user_bottom_l>
					</LI>
					<LI class=user_bottom_c>
					</LI>
					<LI class=user_bottom_r>
					</LI>
				</UL>
			</DD>
			</DD>
			</DD>
		</DL>
	</DIV>
	<SPAN id=ValrUserName style="DISPLAY: none; COLOR: red"> </SPAN>
	<SPAN id=ValrPassword style="DISPLAY: none; COLOR: red"> </SPAN>
	<SPAN id=ValrValidateCode style="DISPLAY: none; COLOR: red"> </SPAN>

	<DIV id=ValidationSummary1 style="DISPLAY: none; COLOR: red">
	</DIV>
	<DIV>
	</DIV>
</FORM>
</BODY>
</html>
<script type="text/javascript">
	<%if (message != null && message.size() > 0) {
				for (int i = 0; i < message.size(); i++) {
					Message m = message.get(i);%>
	alert('<%=m.getText()%>');
	<%}
		  }%>

	function login() {
		var userId = document.getElementById("userId");
		var password = document.getElementById("password");
		if (userId.value == '') {
			alert("用户名不能为空");
			userId.focus();
		} else if (password.value == '') {
			alert("密码不能为空");
			password.focus();
		} else {
			var url = "system/log.login.do";
			var form = document.getElementById("loginForm");
			form.action = url;
			win = window
					.open(
					"",
					'fullscreen' + new Date().getTime(),
					'toolbar=no, menubar=no,scrollbars=no, resizable=no,status=1',
					'true');
			var aw = screen.availWidth;
			var ah = screen.availHeight;
			win.moveTo(0, 0);
			win.resizeTo(aw, ah);
			form.target = win.name;
			form.submit();
			win.opener.opener = null;
			win.opener.close();
		}
	}
	function clear() {
		document.getElementById("userId").value = "";
		document.getElementById("password").value = "";
	}
</script>

